import request from '@/utils/request'
export const getDepartments = () => {
  return request.get('/company/department')
}
// 获取负责人列表
export const getManagers = () => {
  return request.get('/sys/user/simple')
}

// 新增部门
export const addDepartment = (data) => {
  return request.post('/company/department', data)
}

// 查看详情
export const getDepartmentDetail = (id) => {
  return request.get(`/company/department/${id}`)
}

// 更新部门
export const updateDepartment = (data) => {
  return request.put(`/company/department/${data.id}`, data)
}

// 删除部门
export const delDepartment = (id) => {
  return request.delete(`/company/department/${id}`)
}
